package com.happysmile.srm.mybatis.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = "tag")
public class Tag {
    /*
     * tag表主键
     * */
    @ApiModelProperty(value = "tag表主键",required = false)
    @JsonIgnore
    @Id
    @Column
    private Long id;


    /*
     * tag标记，要求：1.唯一2.小写3.简短
     * */
    @ApiModelProperty(value = "tag标记，要求：1.唯一2.小写3.简短",required = true,example = "hadoop")
    @Column(unique = true,nullable = false)
    private String content;

    /*
     * tag录入时间
     * */
    @ApiModelProperty(value = "tag录入时间",example = "2020-11-11 11:11:11")
    @Column(nullable = false)
    private Date createAt;


}